<%@  language="VBScript" %>
<%  Option Explicit %>
<!--#include virtual="adovbs.inc"-->
<%
    Dim objConn, objRSCustomers, objRSAlbums, objRSPhotos
    Dim strSQL    

    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.ConnectionString = "dsn=Developer;uid=JohnNgo;pwd=jo2.0G$!;"    
    'objConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Developer.mdb")    
    objConn.Open
    
    strSQL = "SELECT * FROM customers"
    Set objRSCustomers = Server.CreateObject("ADODB.Recordset")
    objRSCustomers.Open strSQL, objConn
    Do While Not objRSCustomers.EOF
        Response.Write objRSCustomers("customerID") & "<br />"
        Response.Write objRSCustomers("username") & "<br />"
        Response.Write objRSCustomers("password") & "<br />"
        objRSCustomers.MoveNext
    Loop
    objRSCustomers.Close
    set objRSCustomers = Nothing
    
    strSQL = "SELECT * FROM photoAlbums"
    Set objRSAlbums = Server.CreateObject("ADODB.Recordset")
    objRSAlbums.Open strSQL, objConn
    Do While Not objRSAlbums.EOF
        Response.Write objRSAlbums("albumID") & "<br />"
        Response.Write objRSAlbums("username") & "<br />"
        Response.Write objRSAlbums("albumName") & "<br />"
        Response.Write objRSAlbums("priority") & "<br />"
        objRSAlbums.MoveNext
    Loop	
    objRSAlbums.Close
    set objRSAlbums = Nothing
    
    strSQL = "SELECT * FROM photos"
    Set objRSPhotos = Server.CreateObject("ADODB.Recordset")
    objRSPhotos.Open strSQL, objConn
    Do While Not objRSPhotos.EOF
        Response.Write objRSPhotos("photoID") & "<br />"
        Response.Write objRSPhotos("username") & "<br />"
        Response.Write objRSPhotos("fileName") & "<br />"
        Response.Write objRSPhotos("title") & "<br />"
        Response.Write objRSPhotos("description") & "<br />"
        Response.Write objRSPhotos("dateTaken") & "<br />"
        Response.Write objRSPhotos("priority") & "<br />"
        Response.Write objRSPhotos("albumID") & "<br />"
        objRSPhotos.MoveNext
    Loop	
    objRSPhotos.Close
    set objRSPhotos = Nothing              
    
    objConn.Close
    set objConn = Nothing

%>